package com.demo;

public class T1 {
    public static void main(String[] args) {
        int[][] arr = {
                {10,5,8,6},
                {2,6,1,8,6,6},
                {2,2}
        };
        System.out.println(getAvg(arr));
    }
    public static int getAvg(int[][] arr){
        int count = 0;
        for (int[] i : arr) {
            count += i[i.length-1];
        }
        return count / arr.length;
    }
}
